﻿#ifndef CODEFORCESAPI_H
#define CODEFORCESAPI_H

#include <QEventLoop>
#include <QJsonObject>
#include <QNetworkAccessManager>
#include <QNetworkReply>

class HttpPost : public QObject
{
    Q_OBJECT

public:
    explicit HttpPost(QObject* parent = nullptr);

    bool post(const QString& strUrl, const QString& strJsonFile);
    void setAtcoder(bool b);
    QString getLastError() const;

private:
    bool m_bAtcoder = false;
    QNetworkAccessManager* manager;
    QString lastError;
};

#endif CODEFORCESAPI_H